package com.example.logs;

import org.apache.log4j.Logger;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;


@RestController
public class Log4jController {
    Logger logger = Logger.getLogger(Log4jController.class);

    @RequestMapping(value = {"/log1"})
    public String log4j1(Model model) {

        logger.debug("---------> logkkk, {}"+"debug");
        logger.trace("---------> logkkk, {}"+"trace");
        logger.info("---------> logkkk, {}"+"info");
        logger.error("---------> logkkk, {}"+"err");
        System.out.println("-------------log4j hhhhhhhh-------");
        return "log1ok";
    }

}
